import uuid


def parse_uuids(id_str):
    uuids = []
    for part in id_str.split(","):
        part = part.strip()
        if not part:
            continue
        try:
            uuids.append(uuid.UUID(part))
        except ValueError:
            # 可选：记录日志或抛出更友好的错误信息
            raise ValueError(f"Invalid UUID format: {part}")
    return uuids